<!DOCTYPE html>
<html>
<head>
	<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
	<meta name="viewport" content="initial-scale=1.0, user-scalable=no" />
	<style type="text/css">
		body,html,#allmap {
			width: 100%;
			height: 100%;
			overflow: hidden;
			margin: 0;
		}

		#golist {
			display: none;
		}

		@media ( max-device-width : 780px) {
			#golist {
				display: block !important;
			}
		}
	</style>
	<script type="text/javascript"
		src="http://api.map.baidu.com/api?v=2.0&ak=EzfQTH533pbevnhohMX4QZRK"></script>
	<script type="text/javascript"
		src="http://developer.baidu.com/map/jsdemo/demo/convertor.js"></script>
	<title>地图</title>
	<Script language="javascript">
		var map;
	  	window.onload = map_load;  

	  	function map_load() {  
      	//异步调用百度js  注意ak要换成您的密钥
      		var load = document.createElement("script");  
	      	load.src = "http://api.map.baidu.com/api?v=2.0&ak=EzfQTH533pbevnhohMX4QZRK&callback=map_init";  
      		document.head.appendChild(load);  
	  	}
		
	  	function map_init(event){
			map = new BMap.Map("allmap"); // 创建Map实例  
	        map.centerAndZoom("北京",12);
	        map.enableScrollWheelZoom(true); //启用滚轮放大缩小  
	        map.enableDragging();   //开启拖拽
	        //向地图中添加缩放控件  
	        var ctrlNav = new window.BMap.NavigationControl({  
	        	anchor: BMAP_ANCHOR_TOP_LEFT,  
	        	type: BMAP_NAVIGATION_CONTROL_LARGE  
	        });  
	        map.addControl(ctrlNav);  
	  
	        //向地图中添加缩略图控件  
/*	        var ctrlOve = new window.BMap.OverviewMapControl({  
	        	anchor: BMAP_ANCHOR_BOTTOM_RIGHT,  
	        	isOpen: 1  
	        });  
	        map.addControl(ctrlOve);  
	  
	         //向地图中添加比例尺控件  
	        var ctrlSca = new window.BMap.ScaleControl({  
	        	anchor: BMAP_ANCHOR_BOTTOM_LEFT  
	        });  
	        map.addControl(ctrlSca);  
*/	 
	        var logo = new BMap.Icon('logo.png', new BMap.Size(85, 24), {anchor: new BMap.Size(10, 30)});
	        var justepMarker = new BMap.Marker(new BMap.Point(116.4562482,39.8641603), {icon: logo});
	        map.addOverlay(justepMarker);
		}; 
		
		function movePos(longitude, latitude){
        	var point = new BMap.Point(longitude,latitude);
        	var marker = new BMap.Marker(point); //按照地图点坐标生成标记  
        	map.addOverlay(marker);  
        	var label = new BMap.Label("当前位置", { offset: new window.BMap.Size(20, -10) });  
        	marker.setLabel(label);  

        	map.panTo(point);   //移动到当前位置
		};
	</Script>
</head>
<body>
	<div id="allmap"></div>
</body>
</html>